package com.iot.websocket.message;

import com.alibaba.fastjson.JSONObject;
import com.iot.common.enums.BizCode;
import com.iot.websocket.Topic;
import com.iot.websocket.WebSocketMessage;

public class GpsMessage extends WebSocketMessage {

    private String clientNo;

    public GpsMessage() {
        this.setBizCode(BizCode.COMMON.getCode());
    }

    public static GpsMessage getInstance(String topic, String clientNo, JSONObject result){
        GpsMessage instance = new GpsMessage();
        instance.clientNo = clientNo;
        instance.setTopic(topic);
//        JSONObject data = JSONObject.parseObject(result);
        instance.setData(result);
        return instance;
    }

    public String getClientNo() {
        return this.clientNo;
    }
}
